-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Connection() from util package #123
Use Connection() from util package #123
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsafrane The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried this with the example hostpath deployment. It works, but I noticed one drawback: when the hostpath driver gets removed, the csi-attacher container immediately exists and then also immediately gets restarted.
That's all as intended, but it also has the effect that the "Lost connection to CSI driver, exiting" message is lost. kubectl logs
only shows the logs of the restarted csi-attacher.
Should we change that by logging the exit reason to /dev/termination-log
(https://kubernetes.io/docs/tasks/debug-application-cluster/determine-reason-pod-failure/#writing-and-reading-a-termination-message)?
Another solution is to change the deployment:
But the result isn't as nice:
|
Here's a patch for the code:
This leads to this exit status:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm just a nit. And I like @pohly 's idea of for the termination msg
Gopkg.toml
Outdated
@@ -44,7 +44,7 @@ | |||
|
|||
[[constraint]] | |||
name = "github.com/kubernetes-csi/csi-lib-utils" | |||
version = "0.1.0" | |||
version = "0.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to constrain the version here or just use the latest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm for "use the latest" and the constraint does allow that because it means ">= 0.3.0". So this looks right to me.
I like the terminationLog usage, however, it belongs to csi-lib-utils, because it's going to be used in provisioner too. |
Created kubernetes-csi/csi-lib-utils#16 to move GetDriverName to -util. |
/hold |
Filled kubernetes-csi/csi-lib-utils#18 for writing termination log. |
e2cd472
to
9c8de49
Compare
9c8de49
to
2528d33
Compare
I rewrote the PR to newest csi-test (that pulls And I tested everything with a mock driver. |
2528d33
to
3c3bdec
Compare
Rebased to csi-lib-utils=0.3.1-rc1 for preview. Waiting for official release. |
3c3bdec
to
ff48934
Compare
Rebased to csi-test 0.3.1 and csi-lib-util 1.0.3 |
/hold cancel |
/lgtm |
This has several effects:
--connection-timeout
option has no effect now,Connect()
waits forever for the driver.@pohly, @msau42, PTAL